#### Start of system configuration section. ####

srcdir =	@srcdir@
VPATH =		@srcdir@

# Common prefix for machine-independent installed files.
prefix =	@prefix@

# Common prefix for machine-dependent installed files.
exec_prefix =	@exec_prefix@

bindir =	$(exec_prefix)/bin
libdir =	$(exec_prefix)/Sys/libs

INSTALL =	@INSTALL@
INSTALL_DATA =	@INSTALL_DATA@

CC =		@CC@

CFLAGS =	@CFLAGS@
LDFLAGS =	@LDFLAGS@

RANLIB =	@RANLIB@
AR =		ar

#### End system configuration section ####

FLAVOR_CFLAGS =	-m$(CPU) -m$(FPU)
OTHER_CFLAGS =	-fomit-frame-pointer
ALL_CFLAGS =	$(CFLAGS) $(FLAVOR_CFLAGS) $(OTHER_CFLAGS) $(INCS) $(DEFS)

DEFS =
INCS =		-I$(srcdir) -I$(srcdir)/../library -I$(srcdir)/../include
LIB =		libstdio.a
SHELL =		/bin/sh

.c.o:
		$(CC) $(ALL_CFLAGS) -c $< -o $@

SRCS =		clrerr.c fclose.c fdopen.c feof.c ferror.c fflush.c fgetc.c \
		fgetline.c fgetpos.c fgets.c fileno.c findfp.c flags.c \
		fopen.c fprintf.c fpurge.c fputc.c fputs.c fread.c freopen.c \
		fscanf.c fseek.c fsetpos.c ftell.c funopen.c fvwrite.c fwalk.c \
		fwrite.c getc.c getchar.c gets.c getw.c makebuf.c perror.c \
		printf.c putc.c putchar.c puts.c putw.c refill.c rewind.c \
		rget.c scanf.c setbuf.c setbuffer.c setvbuf.c snprintf.c \
		sprintf.c sscanf.c stdio.c tempnam.c tmpfile.c tmpnam.c \
		ungetc.c vfprintf.c vfscanf.c vprintf.c vscanf.c \
		vsnprintf.c vsprintf.c vsscanf.c wbuf.c wsetup.c

OBJS =		clrerr.o fclose.o fdopen.o feof.o ferror.o fflush.o fgetc.o \
		fgetline.o fgetpos.o fgets.o fileno.o findfp.o flags.o \
		fopen.o fprintf.o fpurge.o fputc.o fputs.o fread.o freopen.o \
		fscanf.o fseek.o fsetpos.o ftell.o funopen.o fvwrite.o fwalk.o \
		fwrite.o getc.o getchar.o gets.o getw.o makebuf.o perror.o \
		printf.o putc.o putchar.o puts.o putw.o refill.o rewind.o \
		rget.o scanf.o setbuf.o setbuffer.o setvbuf.o snprintf.o \
		sprintf.o sscanf.o stdio.o tempnam.o tmpfile.o tmpnam.o \
		ungetc.o vfprintf.o vfscanf.o vprintf.o vscanf.o \
		vsnprintf.o vsprintf.o vsscanf.o wbuf.o wsetup.o

$(LIB) :	$(OBJS)
		rm -f $@
		$(AR) rv $@ $(OBJS)
		$(RANLIB) $@

clean:
		rm -f *!

clobber:	clean
		rm -f $(OBJS) $(LIB)

fdopen.o :	local.h
fclose.o :	local.h
fflush.o :	local.h
fwrite.o :	local.h fvwrite.h
findfp.o :	local.h
fpurge.o :	local.h
fwalk.o :	local.h
funopen.o :	local.h
fgetline.o :	local.h
freopen.o :	local.h
fseek.o :	local.h
ftell.o :	local.h
fvwrite.o :	local.h fvwrite.h
fputs.o :	fvwrite.h
fopen.o :	local.h
makebuf.o :	local.h
puts.o :	fvwrite.h
putw.o :	fvwrite.h
setbuf.o :	local.h
refill.o :	local.h
setvbuf.o :	local.h
sprintf.o :	local.h
sscanf.o :	local.h
vfscanf.o :	local.h floatio.h
stdio.o :	local.h
vfprintf.o :	local.h fvwrite.h floatio.h
ungetc.o :	local.h
wbuf.o :	local.h
wsetup.o :	local.h
